cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)

# Set the build type.  Options are:
#  Coverage       : w/ debug symbols, w/o optimization, w/ code-coverage
#  Debug          : w/ debug symbols, w/o optimization
#  Release        : w/o debug symbols, w/ optimization
#  RelWithDebInfo : w/ debug symbols, w/ optimization
#  MinSizeRel     : w/o debug symbols, w/ optimization, stripped binaries
set(ROS_BUILD_TYPE Release)

rosbuild_init()

#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

link_directories(/usr/lib)
link_directories(/usr/local/lib/)
#link_directories(${PROJECT_SOURCE_DIR}/cv_lib)
#include_directories(${PROJECT_SOURCE_DIR}/cv_include)
include_directories(/usr/local/include/opencv2)
include_directories(/usr/local/include/opencv)

#uncomment if you have defined messages
rosbuild_genmsg()
#uncomment if you have defined services
#rosbuild_gensrv()

############ Standard build ###############

rosbuild_add_executable(TeleopControlNode src/TeleopControlNode.cpp)
rosbuild_add_executable(SensorsCalibration src/SensorsCalibration.cpp)
rosbuild_add_executable(Sensors src/Sensors.cpp)

#rosbuild_add_executable(CalcRefsNode src/dist_theta_calculate_refs.cpp)
#rosbuild_add_executable(PathPlanner src/path_planner.cpp)
#rosbuild_add_executable(ControllerNode src/dist_theta_controller.cpp)
rosbuild_add_executable(MappingNode src/MegaNode.cpp)

rosbuild_add_executable(RedDetector src/CameraRedDetector.cpp)
target_link_libraries(RedDetector opencv_core opencv_highgui opencv_imgproc)
rosbuild_add_executable(ImageProcessing src/ImageProcessing.cpp)
target_link_libraries(ImageProcessing opencv_core opencv_highgui opencv_imgproc)
rosbuild_add_executable(TemplateImages src/TemplateImages.cpp)
target_link_libraries(TemplateImages opencv_core opencv_highgui opencv_imgproc)

#rosbuild_add_executable(AdcSimulation src/adc_simulation.cpp)


